﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace Notepad_Clone
{
    partial class NotepadClone
    {
        void AddHelpMenu(Menu menu)
        {
            MenuItem itemHelp = new MenuItem();
            itemHelp.Header = "_Help";
            itemHelp.SubmenuOpened += this.ViewOnOpen;
            menu.Items.Add(itemHelp);

            MenuItem itemAbout = new MenuItem();
            itemAbout.Header = "_About " + this.strAppTitle + "...";
            itemAbout.Click += this.AboutOnClick;
            itemHelp.Items.Add(itemAbout);
        }

        private void AboutOnClick(object sender, RoutedEventArgs e)
        {
            AboutDialog dlg = new AboutDialog(this);
            dlg.ShowDialog();
        }
    }
}
